<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>list</title>
<style type="text/css">
.bodiv{
margin-left:400px;
width:700px;
}
	td{
	border:black,2px;
	}
	.user{
	width:200px;
	float:right 
	}
	
	table,table tr th, table tr td { border:1px solid #0094ff; }
        table { width: 600px; min-height: 25px; line-height: 25px; text-align: center; border-collapse: collapse;}   
	
</style>
</head>
<body>
<div class="bodiv">
<h1>list</h1>
	<div class="user">user:${user.uname}</div>
<table>
<tr>
<c:forEach items="${books}" var="book" varStatus="b" >

	<td>${book.bname }
		<img alt="" src="${book.photo }" width="80" height="120">
		<a href=order?bid=${book.id }>加入购物车</a>
	</td>
	<c:if test="${(b.index+1)%3==0 }"></tr></c:if>
	

</c:forEach>
</table>
</div>
</body>
</html>